<template>
	<!-- 所有种类页面 -->
    <view>
        <menuList :menuLists="lists" 
            imgSize="150rpx"
            bottomSize="200rpx"
            @listenEvent="myEvent" 
            @listenMenu="myMenu">
        </menuList>
    </view>
</template>

<script>
    import menuList from '@/components/menuList.vue';
    export default {
        components:{
            menuList
        },
        data() {
            return {
                lists:[{
                    variety:"种类",
                    goods:[]
                }]
            }
        },
		
		created() {
			this.info()
		},
		
        methods: {
			
			info() {
				uni.request({
					url: 'http://localhost:8099/serviceedu/category/findAll',
					method: 'POST',
					data: {},
					success: (res) => {
						console.log(res.data.data.list)
						this.lists.goods = res.data.data.list
						this.lists.variety='种类'
					}
				})
			},
			
            //列表的点击事件
            myEvent(e){
                console.log(e)
                console.log(e.label)
            },
            //菜单的点击事件
            myMenu(e){
                console.log(e)
				//e=this.lists.goods
                console.log(e.variety)
            },
            //自定义事件
            customize(e){
                console.log(e)
            }
        }
    }
</script>

<style>

</style>